<extend name="Public/base"/>

<block name="body">
        <div class="">
            <div class="fourm-top common-block" style="padding: 15px 20px;margin-top: 0;margin-bottom: 15px">
                <h4>
                    <if condition="$isEdit">
                        {:L('_EDIT_')}{:L('_MODULE_')}
                        <else/>
                        {:L('_CREATE_')}{:L('_MODULE_')}：{:L('_WELCOME_')}{:L('_CREATE_')}{:L('_MODULE_')}
                    </if>
                </h4>
                <hr/>
                <section id="contents">
                    <form class="form-horizontal ajax-form" role="form" action="{:U('Group/Index/create')}" method="post" id="edit-article-form">
                        <input type="hidden" name="group_id" value="{$group.id}"/>

                        <div class="row">
                            <!-- 帖子分类 -->
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="inputTitle" class="col-sm-2 control-label">*{:L('_MODULE_')}{:L('_NAME_')}</label>
                                    <div class="col-sm-10">
                                        <input type="text" name="title" class="form-control" id="inputTitle" placeholder="{:L('_MODULE_')}{:L('_NAME_')}，{:L('_TIP_MODULE_NAME_')}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="inputType" class="col-sm-2 control-label">*{:L('_CATEGORY_')}</label>
                                    <div class="col-sm-10">
                                        <select name="group_type" class="form-control" id="inputType">
                                            <option value="-1">{:L('_PLEASE_SELECT_')}</option>
                                            <volist name="groupTypeAll" id="groupType">
                                                <option value="{$groupType['id']}">{$groupType['title']}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputDescription" class="col-sm-2 control-label">*{:L('_MODULE_')}{:L('_INTRO_')}</label>
                                    <div class="col-sm-10">
                                        <textarea name="detail" class="form-control" id="inputDescription" placeholder="{:L('_TIP_INTRO_')}"></textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputDescription" class="col-sm-2 control-label">*{:L('_MODULE_')}{:L('_TYPE_')}</label>
                                    <div class="col-sm-10">
                                        <label for="id_type_0" style="font-weight: normal">
                                        <input id="id_type_0" name="type" value="0" type="radio" checked="">
                                            {:L('_PUBLIC_')}{:L('_MODULE_')}</label>
                                        <label for="id_type_1" style="font-weight: normal">
                                        <input id="id_type_1" name="type" value="1" type="radio">
                                            {:L('_PRIVATE_')}{:L('_MODULE_')}
                                        </label>
                                        <div style="color: #999">
                                            （{:L(_TIP_GROUP_TYPE_)}）
                                        </div>
                                    </div>

                                </div>

                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">{:L('_MODULE_')}{:L('_FIGURE_')}</label>
                                    <div  class="col-sm-10">
                                        {:W('Common/UploadImage/render',array(array('id'=>'cover_id_cover','name'=>'logo','value'=>'','width'=>200,'height'=>200,'isLoadScript'=>1)))}
                                        <span style="color: #999">（建议上传256*256以上正方形图片，以保证高清且不被裁剪）</span>
                                    </div>
                                </div>
                               <!-- <div class="form-group">
                                    <label  class="col-sm-2 control-label">背景图片</label>

                                    <div  class="col-sm-10">
                                        {:W('Common/UploadImage/render',array(array('id'=>'background','name'=>'background','value'=>'','width'=>200,'height'=>200,'isLoadScript'=>1)))}
                                </div>-->
                                </div>
                                <div class="form-group">
                                    <label for="inputTitle" class="col-sm-2 control-label">*{:L('_NAME_OF_MEMBER_')}</label>
                                    <div class="col-sm-10">
                                        <input type="text" name="member_alias" class="form-control" id="inputMember" placeholder="{:L('_TIP_ALIAS_')}" value="">
                                    </div>
                                </div>
                            </div>

                        <p class="pull-right">
                            <button type="submit" class="btn btn-large btn-primary" id="submit-button">
                                <span class="glyphicon glyphicon-edit"></span>
                            <span id="submit-content">
                                <if condition="$isEdit">
                                    {:L('_MODIFY_')}
                                    <else/>
                                    {:L('_CREATE_')}
                                </if>
                            </span>
                            </button>
                            <input type="hidden" id="isEdit" value="{$isEdit}">
                        </p>
                        <p>
                            <a class="btn btn-large btn-primary" onclick="history.go(-1)">
                                <span class="glyphicon glyphicon-home"></span>
                                {:L('_RETURN_')}
                            </a>
                        </p>
                    </form>
                </section>
            </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/js/ext/webuploader/js/webuploader.js"></script>
    <link href="__PUBLIC__/js/ext/webuploader/css/webuploader.css" type="text/css" rel="stylesheet">
</block>
